<script setup lang="ts">
import{ useCounterStore } from './stores/counter'

// 调用函数，获取数据仓库
const store = useCounterStore()
</script>

<template>
 <div>
  <h1>Vue全局状态管理</h1>
  <p>store:{{ store }}</p>
  <p>dobuleStore:{{ store.dobuleTotalCount }}</p>
  <button @click="store.addTotalCount(1)">修改全局数据store+=1</button>
  <button @click="store.addTotalCount(10)">修改全局数据store+=10</button>
 </div>
</template>

<style scoped>
</style>